package com.bobo.utils;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

import com.alibaba.fastjson.JSON;

@Aspect
@Component
public class MyLogAspect {
	//定义切点
	
	//@Around(value = "execution (* com.bobo.controller.GoodsController.*(..))")
	public void log(ProceedingJoinPoint pjp) throws Throwable {
		System.out.println("============================"+pjp.getSignature().getName());
		Object[] args = pjp.getArgs();
		for (Object object : args) {
			System.out.println(object);
		}
		pjp.proceed(args);
	}

	
}
